package com.tct.smartRE.fwk.api.service;

import java.util.List;

import com.tct.smartRE.fwk.api.IBusinessObject;
import com.tct.smartRE.fwk.api.IQueryCondition;
import com.tct.smartRE.fwk.api.dao.ICommonDAO;

public interface ICommonDBService {

	ICommonDAO getDAO();
	
	Integer save(IBusinessObject object);

	IBusinessObject load(Integer id, Class<?> clazz);

	void delete(IBusinessObject object);

	void delete(Integer id, Class<?> clazz);

	List<IBusinessObject> findAll(Class<?> clazz);

	Integer countAll(Class<?> clazz);

	List<IBusinessObject> findByCondition(IQueryCondition query);

	Integer countByCondition(IQueryCondition query);

}
